import axios from "@/model/axios";
import api from "@/model/api";

export const bannerList = (params) => axios({
    method: "get",
    url: api.living.banner,
    params
})
export const classityPrice = (params) => axios({
    method: "get",
    url: api.living.classity,
    params
})
export const newsClassityQuery = (params) => axios({
    method: "get",
    url: api.living.newsClassity,
    params
})
export const newsKeyQuery = (params) => axios({
    method: "get",
    url: api.living.news,
    params
})
export const newsQuery = (id) => axios({
    method: "get",
    url: api.news.detail + id,
})
export const payAdd = (data) => axios({
    method: "post",
    url: api.living.recharge,
    data,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
});
export const payRecord = (params) => axios({
    method: "get",
    url: api.living.record,
    params,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
});
export const phoneQuery = (params) => axios({
    method: "get",
    url: api.living.phoneQuery,
    params,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
});
export const phonePay = (data) => axios({
    method: "post",
    url: api.living.phonePay,
    data,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
});
export const phoneRecord = (params) => axios({
    method: "get",
    url: api.living.phoneRecord,
    params,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
});